export const formatResponse=(result) =>{
    return {
        success: true,
        data: {
            res:result,
            //简单设置，只有成功设置状态码
            code:200,
            msg:"success"
        }

    };
}
export const formatError=(error) =>{
    return {
        success: false,
        data:{
            msg: error.message,
            code:4000,
            res:{}
        }
    };
}